import About from '@/api/about.js';
export default {
    namespaced: true,
    state: {
        loading: false,
        data: null
    },
    mutations: {
        setLoading(state, payload) {
            state.loading = payload
        },
        setData(state, payload) {
            state.data = payload
        }
    },
    actions: {
        async getAboutData(context) {
            context.commit('setLoading', false);
            let data = await About();
            context.commit('setData', data || null);
            context.commit('setLoading', true);
            return data;
        }
    }
}